package com.best.oasis.settlement.biz.facade.base
{

	import com.best.oasis.flexbase.util.BeanUtils;
	import com.best.oasis.settlement.biz.facade.base.SuperResponder;
	import com.best.oasis.settlement.biz.facade.rpc.RemoteDelegate;
	import com.best.oasis.settlement.util.page.BasePageSO;
	import com.best.oasis.settlement.util.page.PageList;
	
	import mx.controls.Alert;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	
	public class OldBaseFacade
	{
		

		public var delegate:RemoteDelegate;
		
		public function OldBaseFacade()
		{
		}
		
		
		/**
		 * 发生异常时显示错误信息
		 */
		public function showError(event:FaultEvent):void{
			var fieldErrors:Object = event.fault.rootCause["fieldErrors"];
			var errorMsg:String = '';
			if(fieldErrors != null){
				var i:int = 1;
				for each(var fieldError:String in fieldErrors){
					errorMsg += i + '. ' + fieldError + '\n';
					i++;
				}
			}
			if(errorMsg.length > 0){
				Alert.show("保存失败！\n" + errorMsg);
			}else{
				Alert.show("保存失败！" + event.fault.faultString);
			}
		}
	}
}